//package com.zhaopin.utils;
//
//import com.alibaba.excel.EasyExcelFactory;
//import com.alibaba.excel.metadata.BaseRowModel;
//import com.alibaba.excel.metadata.Sheet;
//import org.slf4j.Logger;
//import org.slf4j.LoggerFactory;
//
//import java.io.File;
//import java.io.FileInputStream;
//import java.io.IOException;
//import java.io.InputStream;
//import java.util.List;
//
///**
// * @Auther: len.zhang
// * @Date: 2019/5/17 9:48
// * @Description: excel数据快速读取
// */
//public class ExcelUtils {
//
//    private static final Logger LOGGER = LoggerFactory.getLogger(ExcelUtils.class);
//
//    public static <T extends BaseRowModel> List<Object> readExcel(File file, int sheetNo, int headLineMun, Class<T> classZ) {
//
//        InputStream inputStream = null;
//
//        try {
//
//            inputStream = new FileInputStream(file);
//
//            return EasyExcelFactory.read(inputStream, new Sheet(sheetNo, headLineMun, classZ));
//
//        } catch (Exception e) {
//            e.printStackTrace();
//            LOGGER.error("read excel error", e);
//        } finally {
//            try {
//                if (null != inputStream) {
//                    inputStream.close();
//                }
//            } catch (IOException e) {
//                e.printStackTrace();
//            }
//        }
//        return null;
//    }
//
//    public static <T extends BaseRowModel> List<Object> readExcel(String path, int sheetNo, int headLineMun, Class<T> classZ) {
//        return readExcel(new File(path), sheetNo, headLineMun, classZ);
//    }
//}
